1. Field of the Invention
This invention relates to an apparatus for compressing a digital motion picture signal, and, in particular, to an apparatus in which the efficiency of the compression is increased to reduce the quantity of data to be transmitted.
2. Description of the Related Art
Conventional techniques for compressing a digital motion picture signal obtain a moving vector before quantizing the digital motion picture signal, and quantize the motion picture signal in response to the moving vector. Compressors that compress a digital motion picture signal in response to a moving vector are disclosed in United States patents such as U.S. Pat. Nos. 4,982,285, 4,985,768, and 4,985,768.
Except when scene changes occur, a motion picture signal generally has a high correlation between portions of the motion picture signal representing two consecutive frames of the motion picture. Thus, a motion picture signal can be compressed by determining the differences in the pixel data between consecutive frames of the motion picture signal, and then quantizing these differences. However, if the picture includes moving portions, the resulting quantity of difference data can be large. For this reason, a method called block matching is used instead.
FIGS. 1A to 1C are diagrams explaining the principles of block matching. The nth frame (FIG. 1A) and the n+1th frame (FIG. 1B) are compared. In these frames, the image portion labelled "tree" is almost unchanged between the frames. Therefore, the error resulting from replacing the image portion "tree" in the n+1th frame (FIG. 1B) with the image portion "tree" of the nth frame (FIG. 1A) is rarely perceptible.
On the other hand, the image portion labelled "car" cannot be replaced in a similar manner. The image portion "car" in the n+1th frame (FIG. 1B) has moved significantly compared with the image portion "car" in the nth frame (FIG. 1A). This change of position of the image portion "car" is shown with solid lines and dotted lines in the n+1th frame of FIG. 1B.
In both the nth frame (FIG. 1A) and the n+1th frame (FIG. 1B), there is almost no change in the image portion "car" itself, and the image portion "car" can therefore be considered to be same in both frames. The block containing the image portion "car" in the nth frame (FIG. 1A) has moved horizontally to the position of the block containing the image portion "car" in the n+1th frame (FIG. 1B). Thus, the quantity of data required to represent the motion picture can then be reduced by analyzing the picture into blocks, and expressing the amount and direction of movement of each block between consecutive frames as a moving vector.
The process of finding the block of the previous frame that is in of optimum accordance with the current block of the current frame is called block matching. Block matching does not generate a moving vector immediately. Instead, as shown in FIG. 1C, matching blocks of the previous frame (B1) are compared with the current block (B2). Plural matching blocks are obtained by sequentially shifting the matching block indicated by the motion vector of the previous frame up, down, left, and right by one pixel. The difference between each pixel in the current block and the corresponding pixel of each matching block of the previous frame is determined. Then, the position of the matching block for which the sum of the differences is a minimum is determined, and the moving quantity of this matching block relative to the current block is used as the moving vector of the current block.
Such an apparatus for compressing a digital motion picture signal generates plural matching blocks by defining plural blocks of the previous frame that are displaced in the x- and y-directions relative to the matching block indicated by the moving vector of the previous frame. Block matching is performed in such a way that the moving vector of the one of the matching blocks, obtained by shifting in each direction as just described, that has the least sum of the absolute values of the differences (difference absolute value sum) between the it and the current block is determined to be the moving vector of the current block.
The quantity of difference data can be further reduced by determining the moving vector with half-pixel precision. A typical method for determining such a moving vector will be described with reference to FIG. 2. First, the moving vector is obtained for each block with one-pixel precision. Next, the moving vector Vi is determined with half-pixel precision, as indicated by .quadrature., .DELTA., and .times., by using the pixel (indicated by .circleincircle.) given by the moving vector MVi as the center, and is combined with the moving vector MVi to obtain the moving vector MVH (=MVi+Vi) with half-pixel precision.
For example, in the case of a current picture block consisting of 8 (in the horizontal direction).times.8 (in the vertical direction) pixels, one moving vector with one-pixel precision is obtained for each block in 64 clock cycles. In this time, the corresponding block is displaced in accordance with the moving vector (i,j) and, using the displaced location as a starting point, the data for 10 (in the horizontal direction) .times.10 (in the vertical direction) pixels are read at one-pixel precision from (i-1, j-1) to (i+8, j+8), to carry out the interpolation processing.
When the moving vector MVH is determined with half-pixel precision, a double-density search area is formed by deriving interpolation points (indicated by .quadrature., .DELTA., and .times.) between adjacent pixels (indicated by .circleincircle.) in the search area. Then, the double-density search area is block matched with the current block to determine the moving vector MVH.
To determine the moving vector with a half-pixel precision, a method may be used in which interpolation is performed beforehand over the entire search area, and the resulting interpolation data are stored in a frame memory. In this case, 10 (in the horizontal direction).times.10 (in the vertical direction) pixel data must be read in a period of 64 clock cycles to carry out half-pixel interpolation, so the interpolation operation must be carried out using a clock speed faster than the normal clock speed. Additionally, a clock signal with a clock speed of 64:100 must be generated using a PLL (Phase Locked Loop) circuit. Since the clock speed ratio of the PLL is not simple integer ratio, the system is non-synchronous, and a complex circuit must be used to provide synchronization.
In another method, the computed interpolation data are previously stored in a frame memory, and a moving vector which minimizes the difference absolute value sum can be reliably determined with half-pixel precision. However, since the number of pixels needed for interpolation is larger than the number of pixels subject to block matching, the speed of the block matching processing must be four times higher or a block matching processing circuit having four times the scale must be used.
Therefore, neither of these two alternatives is practical in terms of system construction.